import React, { useState } from "react"
import Test from "./Test"

function getRandomIntInclusive(min, max) {
  min = Math.ceil(min)
  max = Math.floor(max)
  return Math.floor(Math.random() * (max - min + 1)) + min //含最大值，含最小值
}

export default function App() {

  const [c, setC] = useState(0)
  
  return (
    <div>
      {c === 0 && <Test></Test>}
      <button onClick={()=>setC(getRandomIntInclusive(1, 2))}>app按钮</button>
    </div>
  )
}
